home *** CD-ROM | disk | FTP | other *** search
- *** Makefile Mon May 6 18:33:12 1991
- --- ../oleo/Makefile Wed Mar 25 07:45:07 1992
- ***************
- *** 6,13 ****
- #YACC=bison
-
- # This works on a Sun4/110 running ??? (Without DLD)
- ! SYS = -DI_SYSTYPES
- ! CONFIG = -g -DTEST
- SYSLIB =
- SYSOBJ = $(XOBJS)
- YACC = bison
- --- 6,13 ----
- #YACC=bison
-
- # This works on a Sun4/110 running ??? (Without DLD)
- ! #SYS = -DI_SYSTYPES
- ! CONFIG = -static -O3 -Wall
- SYSLIB =
- SYSOBJ = $(XOBJS)
- YACC = bison
- ***************
- *** 48,62 ****
- #SYSLIB =
- #SYSOBJ = $(XOBJS)
-
- # This should be the end of the user-configurable stuff.
- ! CC=cc
- ! OLIB = -lcurses -ltermlib -lm
- CFLAGS = $(SYS) $(CONFIG)
-
- OBJS = parse.tab.o byte_compile.o eval.o cell.o ref.o \
- decompile.o sort.o regions.o utils.o obstack.o \
- io_term.o io_disp.o io_utils.o hash.o\
- ! panic.o \
- $(SYSOBJ)
- # include this if your doprnt is broken (some BSD systems)
- # doprnt.o
- --- 48,64 ----
- #SYSLIB =
- #SYSOBJ = $(XOBJS)
-
- + SYS= -DSYSV -DI_SYSTYPES -DUSG -DPOSIX -DNO_RINT -DNO_UALARM -DA0_REFS -DBITS_PER_CELLREF=16
- +
- # This should be the end of the user-configurable stuff.
- ! CC=gcc
- ! OLIB = -lcurses -ltermcap -lm
- CFLAGS = $(SYS) $(CONFIG)
-
- OBJS = parse.tab.o byte_compile.o eval.o cell.o ref.o \
- decompile.o sort.o regions.o utils.o obstack.o \
- io_term.o io_disp.o io_utils.o hash.o\
- ! panic.o linux.o\
- $(SYSOBJ)
- # include this if your doprnt is broken (some BSD systems)
- # doprnt.o
- ***************
- *** 84,90 ****
- all: oleo $(XOBJS)
-
- oleo: $(OBJS)
- ! $(CC) -o oleo $(CFLAGS) $(OBJS) $(OLIB) $(LIB) $(SYSLIB)
-
- clean:
- rm -f $(OBJS) $(XOBJS) oleo core bugs parse.tab.c
- --- 86,92 ----
- all: oleo $(XOBJS)
-
- oleo: $(OBJS)
- ! $(CC) -o oleo $(CFLAGS) $(OBJS) $(OLIB) $(LIB) $(SYSLIB)
-
- clean:
- rm -f $(OBJS) $(XOBJS) oleo core bugs parse.tab.c
- *** byte_compile.c Tue Apr 30 15:13:07 1991
- --- ../oleo/byte_compile.c Tue Mar 24 23:47:47 1992
- ***************
- *** 19,24 ****
- --- 19,27 ----
- #include "funcdef.h"
-
- #include <stdio.h>
- + #include <math.h>
- + #include <stdlib.h>
- + #include <string.h>
-
- #define obstack_chunk_alloc ck_malloc
- #define obstack_chunk_free free
- *** cell.c Wed May 1 20:35:09 1991
- --- ../oleo/cell.c Wed Mar 25 01:35:38 1992
- ***************
- *** 19,24 ****
- --- 19,25 ----
- #include "funcdef.h"
-
- #include <stdio.h>
- + #include <stdlib.h>
-
- #define obstack_chunk_alloc ck_malloc
- #define obstack_chunk_free free
- ***************
- *** 872,879 ****
- --- 873,886 ----
- f->nowrow=myrow;
- f->colpptr= &(f->nowrow->cols[f->lr-f->nowrow->row_low]);
- f->nowcol= *(f->colpptr)++;
- + if (!f->nowcol)
- + panic("f->nowcol is not a cool pointer",0);
- while(f->nowcol->col_high<f->lc)
- + {
- f->nowcol=f->nowcol->col_next;
- + if (!f->nowcol)
- + panic("f->nowcol is real uncool pointer",0);
- + }
- f->nowcell= &(f->nowcol->cells[f->lc-f->nowcol->col_low]);
-
- #ifdef TEST
- *** cell.h Thu Apr 25 15:32:39 1991
- --- ../oleo/cell.h Tue Mar 24 23:29:05 1992
- ***************
- *** 16,21 ****
- --- 16,27 ----
- along with Oleo; see the file COPYING. If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
- + #include <stdlib.h>
- + #include <math.h>
- + #include <string.h>
- + #include <time.h>
- + #include <unistd.h>
- +
- /* Various structures and stuff for the spreadsheet */
-
- /* A union of possible values for a location in the spreadsheet
- *** decompile.c Mon Apr 29 19:36:43 1991
- --- ../oleo/decompile.c Tue Mar 24 23:49:47 1992
- ***************
- *** 16,21 ****
- --- 16,22 ----
- along with Oleo; see the file COPYING. If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
- + #include <stdio.h>
- #include "funcdef.h"
- #include "sysdef.h"
-
- *** eval.c Sat May 4 14:28:45 1991
- --- ../oleo/eval.c Mon Mar 23 00:22:59 1992
- ***************
- *** 19,24 ****
- --- 19,25 ----
- #include <math.h>
- #include <ctype.h>
- #include <stdio.h>
- + #include <string.h>
-
- #ifdef __TURBOC__
- #define SMALLEVAL
- *** io_disp.c Tue Apr 30 15:22:15 1991
- --- ../oleo/io_disp.c Wed Mar 25 04:01:56 1992
- ***************
- *** 16,21 ****
- --- 16,22 ----
- along with Oleo; see the file COPYING. If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
- + #define A_STANDOUT _STANDOUT
- #include "funcdef.h"
-
- #include <fcntl.h>
- ***************
- *** 159,164 ****
- --- 160,167 ----
- extern void kill_slop EXT4(VOIDSTAR, CELLREF, CELLREF, CELLREF);
- extern void change_slop EXT6(VOIDSTAR, CELLREF, CELLREF, CELLREF, CELLREF, CELLREF);
- extern void set_slop EXT4(VOIDSTAR *, CELLREF, CELLREF, CELLREF);
- + extern void map_chr(int n);
- + extern void set_options(char *opts);
-
- extern char *print_cell EXT1(CELL *);
- extern char *adjust_prc EXT5(char *, CELL *, int, int, int);
- ***************
- *** 403,408 ****
- --- 406,412 ----
- {
- clear();
- refresh();
- + nl();
- (void)endwin();
- }
-
- ***************
- *** 1555,1566 ****
- CELLREF ccl,cch;
-
- for(wwid=wid;lenstr>wwid-1;wwid+=get_width(cc)) {
- ! if( ++cc>win->screen.hc
- ! || ( ccp=find_cell(r,cc))
- && GET_TYP(ccp)
- ! && ( GET_FMT(ccp)!=FMT_HID
- ! || ( GET_FMT(ccp)==FMT_DEF
- ! && default_fmt!=FMT_HID))) {
- --cc;
- break;
- }
- --- 1559,1570 ----
- CELLREF ccl,cch;
-
- for(wwid=wid;lenstr>wwid-1;wwid+=get_width(cc)) {
- ! if( (++cc>win->screen.hc)
- ! || (( ccp=find_cell(r,cc))
- && GET_TYP(ccp)
- ! && ( (GET_FMT(ccp)!=FMT_HID)
- ! || ( (GET_FMT(ccp)==FMT_DEF)
- ! && (default_fmt!=FMT_HID))))) {
- --cc;
- break;
- }
- *** io_term.c Mon May 6 19:36:43 1991
- --- ../oleo/io_term.c Wed Mar 25 09:47:09 1992
- ***************
- *** 20,25 ****
- --- 20,27 ----
- #include <errno.h>
- #include <fcntl.h>
- #include <stdio.h>
- + #include <stdlib.h>
- + #include <string.h>
- #include <signal.h>
-
- #ifdef I_IOCTL
- ***************
- *** 69,75 ****
-
- #define WTH_CHR 0x4
- #define BRK 0x8
- ! #define NC 0x10
-
- struct line {
- int alloc;
- --- 71,77 ----
-
- #define WTH_CHR 0x4
- #define BRK 0x8
- ! #define NC 0x10
-
- struct line {
- int alloc;
- ***************
- *** 87,92 ****
- --- 89,95 ----
- /* External spreadsheet functions */
-
- /* utils.c */
- + extern int usr_set_fmts(void);
- extern char *char_to_string EXT1(char);
- extern int string_to_char EXT1(char **);
- extern FILE *xopen_with_backup EXT2(const char *,const char *);
- ***************
- *** 103,108 ****
- --- 106,113 ----
- extern void panic_write_file EXT2(FILE *,struct rng *);
- extern int panic_set_options EXT2(int, char *);
- extern void panic_show_options EXT0();
- + extern void text_start EXT0();
- + extern void text_finish EXT0();
-
- #ifdef USE_DLD
- /* If we're using dynamic linking, we get the names of the
- ***************
- *** 264,273 ****
- --- 269,284 ----
- /* Original value is 10 seconds/tick */
- unsigned signal_ticks = 10 * TIMER_MULT;
-
- + /*
- void (*read_file) EXT2(FILE *,int) = panic_read_file;
- void (*write_file) EXT2(FILE *,struct rng *) = panic_write_file;
- int (*set_file_opts) EXT2(int, char *) = panic_set_options;
- void (*show_file_opts) EXT0() = panic_show_options;
- + */
- + void (*read_file) EXT2(FILE *,int) = sc_read_file;
- + void (*write_file) EXT2(FILE *,struct rng *) = sc_write_file;
- + int (*set_file_opts) EXT2(int, char *) = sc_set_options;
- + void (*show_file_opts) EXT0() = sc_show_options;
-
- int n_bound_macros;
- struct rng *bound_macros;
- ***************
- *** 679,685 ****
- extern void set_format();
- extern void move_region();
- extern void delete_region();
- ! extern void format_area();
- extern void open_window();
- extern void close_window();
- extern void goto_window();
- --- 690,696 ----
- extern void set_format();
- extern void move_region();
- extern void delete_region();
- ! extern void format_area FUN1(struct rng *,f);
- extern void open_window();
- extern void close_window();
- extern void goto_window();
- ***************
- *** 912,917 ****
- --- 923,930 ----
-
- #else
- #if !defined(SIGIO)
- + #undef NC
- + #undef HZ
- #include <curses.h>
-
- int intr1 = 0;
- ***************
- *** 1236,1242 ****
- --- 1249,1259 ----
- dbg_show_wins();
- break;
- case 'k':
- + #ifdef __TURBOC__
- text_line("i_in %d i_cnt %d have_input %d",i_in,i_cnt,have_kbd_input);
- + #else
- + puts("OK>");
- + #endif
- break;
- }
- text_finish();
- ***************
- *** 1314,1320 ****
- setbuffer(stdout,buf,sizeof(buf));
- #endif
- if(argc<2 || strcmp(argv[1],"-q")) {
- ! if(!getenv("OLEO")) {
- fprintf(stdout,"Oleo version 0.03.2, Copyright (C) 1990 Free Software Foundation, Inc.\n");
- fprintf(stdout,"There is ABSOLUTELY NO WARRANTY for Oleo; see the file COPYING\n");
- fprintf(stdout,"for details. Oleo is free software and you are welcome to distribute\n");
- --- 1331,1337 ----
- setbuffer(stdout,buf,sizeof(buf));
- #endif
- if(argc<2 || strcmp(argv[1],"-q")) {
- ! if(getenv("OLEO")) {
- fprintf(stdout,"Oleo version 0.03.2, Copyright (C) 1990 Free Software Foundation, Inc.\n");
- fprintf(stdout,"There is ABSOLUTELY NO WARRANTY for Oleo; see the file COPYING\n");
- fprintf(stdout,"for details. Oleo is free software and you are welcome to distribute\n");
- ***************
- *** 1396,1403 ****
- --- 1413,1422 ----
- #ifdef SIGQUIT
- signal(SIGQUIT,got_sig);
- signal(SIGILL,got_sig);
- + #ifndef linux
- signal(SIGEMT,got_sig);
- signal(SIGBUS,got_sig);
- + #endif
- signal(SIGSEGV,got_sig);
- signal(SIGPIPE,got_sig);
- #endif
- ***************
- *** 3177,3183 ****
- /* topclear=2; */
- }
-
- ! static void
- format_area FUN1(struct rng *,f)
- {
- int c;
- --- 3196,3202 ----
- /* topclear=2; */
- }
-
- ! void
- format_area FUN1(struct rng *,f)
- {
- int c;
- ***************
- *** 3406,3416 ****
- static void
- quit_cmd FUN0()
- {
- - int c;
-
- close_display();
- #ifdef FASYNC
- ! c=fcntl(0,F_SETFL,term_flag);
- #endif
- #ifdef FIOSSAIOSTAT
- if((term_flag&1)==0) {
- --- 3425,3437 ----
- static void
- quit_cmd FUN0()
- {
-
- close_display();
- #ifdef FASYNC
- ! {
- ! int c;
- ! c=fcntl(0,F_SETFL,term_flag);
- ! }
- #endif
- #ifdef FIOSSAIOSTAT
- if((term_flag&1)==0) {
- *** list.c Thu May 2 18:59:32 1991
- --- ../oleo/list.c Wed Mar 25 01:07:35 1992
- ***************
- *** 120,126 ****
- fputs(flt_to_str(cp->cell_flt),fp);
- break;
- case TYP_INT:
- ! fprintf(fp,"%ld",cp->cell_flt);
- break;
- case TYP_STR:
- fputs(cp->cell_str,fp);
- --- 120,127 ----
- fputs(flt_to_str(cp->cell_flt),fp);
- break;
- case TYP_INT:
- ! /*fprintf(fp,"%ld",cp->cell_flt); ???*/
- ! fprintf(fp,"%ld",cp->cell_int);
- break;
- case TYP_STR:
- fputs(cp->cell_str,fp);
- *** panic.c Mon Apr 29 18:32:25 1991
- --- ../oleo/panic.c Wed Mar 25 00:50:01 1992
- ***************
- *** 18,23 ****
- --- 18,24 ----
-
- #undef NULL
- #include <stdio.h>
- + #include <unistd.h>
- #include "funcdef.h"
- #include "sysdef.h"
-
- ***************
- *** 27,34 ****
-
- extern int dup EXT1(int);
- extern int close EXT1(int);
- ! extern void *sbrk EXT1(size_t);
- ! extern void *brk EXT1(void *);
-
- void
- panic_write_file FUN2(FILE *,fp, struct rng *,rng)
- --- 28,34 ----
-
- extern int dup EXT1(int);
- extern int close EXT1(int);
- ! extern void recenter_all_win(void);
-
- void
- panic_write_file FUN2(FILE *,fp, struct rng *,rng)
- *** ref.c Mon May 6 16:04:02 1991
- --- ../oleo/ref.c Tue Mar 24 23:27:43 1992
- ***************
- *** 28,33 ****
- --- 28,34 ----
- #include "cell.h"
- #include "eval.h"
-
- + unsigned ualarm FUN2(unsigned,first, unsigned,others);
- extern VOIDSTAR hash_new();
- extern VOIDSTAR hash_find();
- extern char *hash_insert();
- *** regions.c Fri May 3 14:14:52 1991
- --- ../oleo/regions.c Tue Mar 24 23:51:47 1992
- ***************
- *** 37,42 ****
- --- 37,43 ----
- extern void sort EXT4(int, int(*)(int,int),void(*)(int,int),void(*)(int,int));
- extern char *set_new_value EXT4(CELLREF, CELLREF, int, union vals *);
- extern char *new_value EXT3(CELLREF, CELLREF, char *);
- + extern void copy_cell FUN4(CELLREF,rf, CELLREF,cf, CELLREF,rt, CELLREF,ct);
-
- extern void flush_old_value EXT0();
-
- *** string.c Mon Apr 29 18:58:31 1991
- --- ../oleo/string.c Wed Mar 25 01:01:19 1992
- ***************
- *** 17,22 ****
- --- 17,23 ----
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
- #include <ctype.h>
- + #include <stdio.h>
- #include "funcdef.h"
- #define obstack_chunk_alloc ck_malloc
- #define obstack_chunk_free free
- *** sylk.c Thu May 2 15:03:14 1991
- --- ../oleo/sylk.c Wed Mar 25 01:11:53 1992
- ***************
- *** 46,51 ****
- --- 46,54 ----
- extern void clear_spreadsheet EXT0();
-
- extern char *new_var_value EXT3(char *, int, char *);
- + extern void set_usr_stats EXT2(int, char **);
- + extern void get_usr_stats EXT2(int, char **);
- + extern int usr_set_fmts EXT0();
-
- extern char *read_new_value EXT4(CELLREF, CELLREF, char *, char *);
-
- ***************
- *** 55,60 ****
- --- 58,64 ----
-
- extern char *cell_name EXT2(CELLREF, CELLREF);
- extern char *range_name EXT1(struct rng *);
- + extern void recenter_all_win(void);
-
- extern char *bname[];
- extern default_jst;
- *** sysdef.h Wed May 1 15:35:48 1991
- --- ../oleo/sysdef.h Wed Mar 25 00:18:53 1992
- ***************
- *** 22,27 ****
- --- 22,31 ----
- /* Declarations for system functions, etc
- These shouldn't be needed, but are */
-
- + #ifndef CRAZY
- + extern int stricmp EXT2(const char *,const char *);
- + extern int strincmp EXT3(const char *,const char *,size_t);
- + #else
- extern int errno;
-
- extern void exit EXT1(int);
- ***************
- *** 112,117 ****
- --- 116,123 ----
- extern void setbuffer EXT3(FILE *,char *,size_t);
- #endif
- extern int access EXT2(const char *, int);
- + #endif
- +
- #endif
-
- #if defined(__STDC__) && defined(obstack_chunk_alloc)
- *** utils.c Thu May 2 14:21:33 1991
- --- ../oleo/utils.c Wed Mar 25 04:52:48 1992
- ***************
- *** 16,21 ****
- --- 16,24 ----
- along with Oleo; see the file COPYING. If not, write to
- the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
- #include <stdio.h>
- + #include <stdlib.h>
- + #include <string.h>
- + #include <unistd.h>
-
- #include "funcdef.h"
- #include "sysdef.h"
- ***************
- *** 58,65 ****
- #define _IOSTRG 0
- #endif
-
- - extern VOIDSTAR malloc();
- -
- VOIDSTAR ck_malloc EXT1(size_t);
- VOIDSTAR ck_realloc EXT2(VOIDSTAR,size_t);
- char *strdup EXT1(CONST char *);
- --- 61,66 ----
- ***************
- *** 330,339 ****
- VOIDSTAR
- ck_malloc FUN1(size_t, size)
- {
- ! VOIDSTAR ret;
-
- ! ret=malloc(size);
- ! if(ret==(VOIDSTAR)0)
- panic("Couldn't allocate %u bytes",size);
- return ret;
- }
- --- 331,342 ----
- VOIDSTAR
- ck_malloc FUN1(size_t, size)
- {
- ! char * ret;
-
- ! if (size <= 0)
- ! panic("bad size passed to ck_malloc", size);
- ! ret=(char *)malloc(size);
- ! if(ret==(char *)0)
- panic("Couldn't allocate %u bytes",size);
- return ret;
- }
- ***************
- *** 345,350 ****
- --- 348,355 ----
- VOIDSTAR ret;
- VOIDSTAR realloc EXT2(VOIDSTAR,size_t);
-
- + if (size <= 0)
- + panic("bad size passed to ck_realloc", size);
- ret=realloc(ptr,size);
- if(ret==(VOIDSTAR)0)
- panic("Couldn't re-allocate %u bytes from %p",size,ptr);
- ***************
- *** 593,598 ****
- --- 598,604 ----
- return chr1 - chr2;
- }
-
- + #ifndef linux
- CONST char *
- strstr FUN2(CONST char *,s, CONST char *,wanted)
- {
- ***************
- *** 612,617 ****
- --- 618,624 ----
- return (char *)0;
- return scan;
- }
- + #endif
-
- extern int sys_nerr;
- extern char *sys_errlist[];
-